package cn.kgc.rbac.common;

/**
 * @author: mosin
 * @version: v1.0  2023/1/30
 * 响应状态码枚举
 */
public enum CodeMsg {

    SUCCESS("操作成功",0),
    FAIL("操作失败",500),

    CAPTCHA_EXPIRE("验证码已失效",30001),
    CAPTCHA_ERROR("验证码错误",30002),


    USER_NOT_EXIST("用户不存在",20001),
    USER_EXIST("用户已存在",20002),
    USER_PASSWORD_ERROR("密码错误",20003),
    USER_LOCKED("用户被禁用",20004),

    USER_NO_AUTHORIZATION("没有权限，请联系管理员",403),
    ROLE_HASUSED("角色被占用",40002),

    ROLE_EXIST("角色已存在",40001),
    PERMISSION_USED("权限含有子选项,不能删除",60001);



    private String msg;
    private Integer code;

    CodeMsg(String msg,Integer code){
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public Integer getCode() {
        return code;
    }
}
